#ifndef STATEMANAGER_H
#define STATEMANAGER_H

#include <QObject>

class State;
class QMouseEvent;

class StateManager : public QObject
{
    Q_OBJECT
public:
    explicit StateManager(QObject* parent = 0);

    void handleMousePressEvent(QMouseEvent* pEvent);
    void handleMouseMoveEvent(QMouseEvent* pEvent);
    void handleMouseReleaseEvent(QMouseEvent* pEvent);

    void handleDraw();
private:
    QPointer<State> m_currentState;
signals:
    void stateEntered(QPointer<State> state);
    void stateExited(QPointer<State> state);
public slots:
    void setCurrentState(QPointer<State> state);
};

#endif // STATEMANAGER_H
